<template>
  <div>
    <h1>Home - 滚动行为</h1>

    <!-- 命名视图 -->
    <router-link to="/user1">user1</router-link>
    <router-link style="margin-left: 10px" to="/user2">user2</router-link>

    <button @click="$router.push('/login')">home</button>
    <button @click="$router.push('/reg')">reg</button>

    <hr />

    <router-view></router-view>
    <router-view name="bbb"></router-view>
    <router-view name="ccc"></router-view>
  </div>
</template>

<script setup lang="ts"></script>

<style scoped>
div {
  height: 100vh;
  overflow: auto;
}

h1 {
  height: 200vh;
  line-height: 200vh;
  text-align: center;
  font-size: 50px;
  color: #fff;
  background-color: #333;
}
</style>
